<?php
    
    //print_r($content);\
    if(!empty($content)):
?>
<!-- /.row -->
            <div class="row">
            	<div class="col-lg-12">
            		<h1 class="page-header">
            			Danh sách
            		</h1>
            	</div>
            	<!-- /.col-lg-12 -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <i class="fa fa-sitemap fa-fw"></i> Danh sách bài thi
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th width="5%">ID</th>
                                            <th>Tên bài thi</th>
                                            <th width="10%">Video</th>
                                            <th width="7%">Like</th>
                                            <th width="10%">Comment</th>
                                            <th width="10%">Ngày tạo</th>
                                            <th width="13%">Tùy chọn</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                            foreach($content as $v):
                                                $by = '<i class="fa fa-times"></i>';
                                                if(!empty($v->status)){
                                                    $by = '<i class="fa fa-check"></i>';
                                                }
                                        ?>
                                        <tr class="odd gradeX">
                                            <td class="center"><a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=$v->id?></a></td>
                                            <td class="center"><a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=$v->name?></a></td>
                                            <td class="center"><a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=$v->link?></a></td>
                                            <td class="center"><a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=$v->like?></a></td>
                                            <td class="center"><a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=$v->comment?></a></td>
                                            <td class="center"><a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=date('d/m/Y H:i:s',$v->created)?></a></td>
                                            <td class="center">
                                                <a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>"><?=$by?></a>
                                                <a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/edit/id/<?=$v->id?>" class="btn btn-outline btn-primary btn-sm">Sửa</a>
                                                <a href="{{constant("PUBLIC_URL_ADMIN")}}admin-articlegame/delete/id/<?=$v->id?>" class="btn btn-outline btn-primary btn-sm">Xóa</a>
                                            </td>
                                        </tr>
                                        <?php
                                            endforeach;
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                           
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
<?php
    endif;
?>